package com.example.bounced;

import android.app.Activity;
import android.text.Layout;
import android.view.View;

import androidx.fragment.app.Fragment;

public class CustomPopups {
       private MyDialog mMyDialog;


     //初始化布局
    public  View layoutview(Activity activity,  int s,boolean blankEvent){
        View view = activity.getLayoutInflater().inflate(s, null);
        mMyDialog = new MyDialog(activity, 1000, 0, view, R.style.DialogTheme);
        if (blankEvent){
            mMyDialog.setCanceledOnTouchOutside(blankEvent);
        }else {
            mMyDialog.setCanceledOnTouchOutside(blankEvent);
        }

        return view;
         }
//         调起
         public MyDialog dialog(){
             return mMyDialog;
         }
}
